package com.guoguo.service.impl;

import com.github.pagehelper.PageHelper;
import com.guoguo.base.PageBean;
import com.guoguo.base.PaginationContext;
import com.guoguo.entity.vo.AttentionVO;
import com.guoguo.mapper.AttentionMapper;
import com.guoguo.service.AuthorService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * Created by KLSD on 2017/9/15.
 */
@Service
public class AuthorServiceImpl implements AuthorService{
    @Autowired
    private AttentionMapper attentionMapper;


    @Override
    public PageBean<AttentionVO> getAttentionAuthorList(String userId,int pageNum,int pageSize) {
        PageHelper.startPage(pageNum, PaginationContext.getPageSize());
        List<AttentionVO> attentionVOs=attentionMapper.getAttentionAuthorList(userId,pageNum,pageSize);
        return new PageBean<AttentionVO>(attentionVOs);
    }
}
